package com.xdf.whiteaccount.entity;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
/**
 * 由 chanchaw 创建于 2023-12-7 8:13:57，实现功能如下：
 * 1. 实现接口 Serializable
 * 2. 无参构造函数
 * 3. 建造者模式
 * 4. getter,setter,toString()
 * pda扫描二维码的流水记录
 */
public class ScanList implements Serializable {
    public ScanList() {}
    private static final long serialVersionUID = 1L;

    private Integer id;//自增主键
    private Integer deviceId;//pda设备编号
    private String qrCategory;//扫描的二维码类型：单匹、货架
    private Integer qrId;//单匹主键 = 打卷表主键
    private String qrString;//货架号
    private Integer state;//状态，1有效，0无效
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    private java.util.Date createTime;//创建时间，DB自动填充

    public Integer getId(){return this.id;}
    public void setId(Integer id){this.id = id;}
    public Integer getDeviceId(){return this.deviceId;}
    public void setDeviceId(Integer deviceId){this.deviceId = deviceId;}
    public String getQrCategory(){return this.qrCategory;}
    public void setQrCategory(String qrCategory){this.qrCategory = qrCategory;}
    public Integer getQrId(){return this.qrId;}
    public void setQrId(Integer qrId){this.qrId = qrId;}
    public String getQrString(){return this.qrString;}
    public void setQrString(String qrString){this.qrString = qrString;}
    public Integer getState(){return this.state;}
    public void setState(Integer state){this.state = state;}
    public java.util.Date getCreateTime(){return this.createTime;}
    public void setCreateTime(java.util.Date createTime){this.createTime = createTime;}


    @Override
    public String toString() {
        return "ScanList{" +
        ",id='" + id + '\'' +
        ",deviceId='" + deviceId + '\'' +
        ",qrCategory='" + qrCategory + '\'' +
        ",qrId='" + qrId + '\'' +
        ",qrString='" + qrString + '\'' +
        ",state='" + state + '\'' +
        ",createTime='" + createTime + '\'' +
        '}';
    }

    public static class Builder{
        private Integer id;
        private Integer deviceId;
        private String qrCategory;
        private Integer qrId;
        private String qrString;
        private Integer state;
        private java.util.Date createTime;

        public Builder id(Integer id){this.id = id;return this;}
        public Builder deviceId(Integer deviceId){this.deviceId = deviceId;return this;}
        public Builder qrCategory(String qrCategory){this.qrCategory = qrCategory;return this;}
        public Builder qrId(Integer qrId){this.qrId = qrId;return this;}
        public Builder qrString(String qrString){this.qrString = qrString;return this;}
        public Builder state(Integer state){this.state = state;return this;}
        public Builder createTime(java.util.Date createTime){this.createTime = createTime;return this;}
        public ScanList build(){
            return new ScanList(this);
        }
    }

    public static Builder builder(){return new Builder();}
    public ScanList(Builder builder){
        this.id = builder.id;
        this.deviceId = builder.deviceId;
        this.qrCategory = builder.qrCategory;
        this.qrId = builder.qrId;
        this.qrString = builder.qrString;
        this.state = builder.state;
        this.createTime = builder.createTime;
    }
    /**
     * 自定义代码请写在此处之后
     */
}
